import Main from "@/views/Main/index.vue";
/**
 * title 菜单，面包屑名
 * hideInMenu 是否现在在菜单中
 * hideInLabel 打开后是否显示在标签栏中
 * noCache 页面是否被缓存
 * icon 菜单图标
 */
const routes = [
  {
    path: "/login",
    name: "login",
    meta: {
      title: "登录",
      hideInMenu: true,
    },
    component: () => import("@/views/Login/index.vue"),
  },
  {
    path: "/",
    name: "main",
    component: Main,
    redirect: "/home",
    meta: {
      title: "首页",
    },
    children: [
      {
        path: "home",
        name: "home",
        meta: {
          title: "首页",
          icon: "el-icon-s-home",
        },
        component: () => import("@/views/Home/index.vue"),
      },
    ],
  },
  {
    path: "/test",
    name: "test",
    component: Main,
    meta: {
      title: "测试组",
      icon: "el-icon-s-home",
    },
    children: [
      {
        path: "test2",
        name: "test22",
        meta: {
          title: "测试2",
          icon: "el-icon-s-home",
        },
        component: () => import("@/views/Test/index2.vue"),
      },
      {
        path: "index1",
        name: "test1",
        meta: {
          title: "测试1",
          icon: "el-icon-s-home",
        },
        component: () => import("@/views/Test/index.vue"),
      },
    ],
  },
];
export default routes;
